Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drupal uri predicate #729

Merged
merged 5 commits into from
Oct 21, 2019
Merged

Drupal uri predicate #729

merged 5 commits into from
Oct 21, 2019

Conversation

dannylamb
Copy link

Originally from @rosiel. Can't take any credit for this one! Migrated over from Islandora-CLAW/islandora.

GitHub Issue: Islandora/documentation#1303

To channel @seth-shaw-unlv , 🎶 If I go there's just no telling how far I'll go 🎶

  • Per Eli's and my diagram, this is how we put (excuse the lazy rdf) <node/1> schema:sameAs <node/1> in the JSON-LD of node/1, in order to have <fedoraURI> schema:sameAs <node/1>. The schema:sameAs is the "Drupal URI Predicate" in the "Map Drupal URI to Predicate" reaction. Those labels, alone, do not explain what's going on.

What does this Pull Request do?

Renames almost all uses of "Map URI to predicate"-type wording into "JSON-LD Self-Reference Predicate"-type wording.

What's new?

Front-end:

  • Renames the Reaction's human-readable label to "JSON-LD self-reference".
  • Renames the human-readable label variable in the config form to 'Self-reference predicate'
  • Renames the human-readable description of that variable in the config form to "When creating the JSON-LD for this Drupal entity, add a relationship from the entity to itself using this predicate. It must use a defined RDF namespace prefix."
  • renames the human-readable summary for this reaction (! where does this appear??) to 'When creating the JSON-LD for this Drupal entity, add a relationship to itself using this predicate.'

Back-end:

  • renames the Reaction's class to JsonldSelfReferenceReaction, and renames the php file.
  • renames the constant to SELF_REFERENCE_PREDICATE
  • renames some internal variables
  • renames the test files to match, and to find the correct config form field.

Does not change:

  • the internal id of the reaction remains islandora_map_uri_predicate

Could this change impact execution of existing code?

  • I don't think so. I think that because the internal id didn't change, this should just work (after a cache clear)

How should this be tested?

  • Pull this code into islandora
  • Clear your cache
  • Look at existing Contexts that contain this reaction (e.g. Content). The wording above should appear in the interface.
  • the context should continue to work as intended, i.e. this causes a "schema:sameAs" to appear in the json-ld of the node, pointing to itself.
  • you can add this reaction to another context and it works as intended.
  • best way to test: show this to someone who doesn't know how this works and ask them what they think it does.

Additional Notes:

...

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora-CLAW/committers

@dannylamb
Copy link
Author

dannylamb commented Oct 21, 2019

Tested, nothing breaks, code and interface are clearer 👍

@dannylamb dannylamb merged commit 1e0b98e into 8.x-1.x Oct 21, 2019
@dannylamb dannylamb deleted the drupal-uri-predicate branch October 31, 2019 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants